import random


class FrozenTime:
    _data = {}

    @classmethod
    def setdefault(cls, key, seconds):
        cls._data.setdefault(key, seconds)

    @classmethod
    def init(cls, key, seconds):
        cls._data[key] = seconds

    @classmethod
    def init_random(cls, key, seconds_min, seconds_max):
        seconds = random.randint(seconds_min, seconds_max)
        cls.init(key, seconds)

    @classmethod
    def frozen(cls, key, seconds):
        cls._data.setdefault(key, 0)
        cls._data[key] += seconds

    @classmethod
    def get_seconds(cls, key):
        return cls._data[key]
